From: Owen W. Taylor Date: Thu, 5 Jun 2014 19:08:29 +0000 (-0400) Subject: ShellPerfLog: Use monotonic timestamps for logging X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2337 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f0d4260c81886c32aecd001bd1e6cb6268836dad;p=gnome-shell.git ShellPerfLog: Use monotonic timestamps for logging Use g_get_monotonic_time() (that is, CLOCK_MONOTONIC) timestamps, rather than gettimeofday() values. https://bugzilla.gnome.org/show_bug.cgi?id=732350 --- diff --git a/src/shell-perf-log.c b/src/shell-perf-log.c index 6c1f293ce..ab78deddc 100644 --- a/src/shell-perf-log.c +++ b/src/shell-perf-log.c @@ -126,11 +126,7 @@ G_DEFINE_TYPE(ShellPerfLog, shell_perf_log, G_TYPE_OBJECT); static gint64 get_time (void) { - GTimeVal timeval; - - g_get_current_time (&timeval); - - return timeval.tv_sec * G_GINT64_CONSTANT(1000000) + timeval.tv_usec; + return g_get_monotonic_time (); } static void